package controller.util;

import constant.Constant;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class SkipURLController {

//    登陆界面跳转查询界面
    @RequestMapping("/front_select.do")
    public String skipFrontSelect(){
        return "front/front_select";
    }

//    跳转积分记录页面
    @RequestMapping("/user/front_record.do")
    public String skipFrontRecord(){
        return "front/front_record";
    }

//    课程章节管理”页面跳转相关评论页面
    @RequestMapping("/chapter/sendChapterId.do")
    public String sendChapterId(Integer chapter_id, HttpServletRequest request){
        System.out.println("chapter_id="+chapter_id);
        request.getSession().setAttribute(Constant.SESSION_CHAPTER_ID,chapter_id);
        return "redirect:"+request.getContextPath()+"/comment/findByChapterId.do";
    }
}
